Definition (class 𝐍𝐏\mathbf{NP})

A language L{0,1}L \subseteq \{0,1\}^* is in 𝐍𝐏\mathbf{NP} if there exists a polynomial p:p : \mathbb{N} \to \mathbb{N} and a polynomial-time TM MM (called the verifier for LL) such that for every x{0,1}x \in \{0,1\}^*,

xLu{0,1}p(|x|) s.t.M(x,u)=1x \in L \iff \exists u \in \{0,1\}^{p(\lvert x \rvert)} \text{ s.t.} M(x,u)=1

If xLx \in L and u{0,1}p(|x|)u \in \{0,1\}^{p(\lvert x \rvert)} satisfy M(x,u)=1M(x,u) = 1, then we can call uu a certificate for xx (with respect to language LL, machine MM). Also known in some texts as witness.

In other words, 𝐍𝐏\mathbf{NP} is the set of all languages LL such that there exists a polynomial-time algorithm AA with xLy s.t. A(x,y)=1x \in L \iff \exists y \text{ s.t. } A(x,y) = 1.

(there is a polynomial-time algorithm to verify "yes" instances given the appropriate certificate)

Definition (NP puzzle)

An NP puzzle consists of a poly-time computable relation R(y,x)R(y, x). Think of yy as a puzzle or statement, and xx as a solution or witness. The relation RR tests if xx is a good solution for the problem yy and outputs 11 (accept) or 00 (reject).

Notes

Theorem (in terms of NTIME)

𝐍𝐏=c𝐍𝐓𝐈𝐌𝐄(nc)\mathbf{NP} = \cup_{c \in \mathbb{N}} \mathbf{NTIME}(n^c)
(see NTIME)

see also


References

  1. S. Arora, B. Barak. Computational Complexity: A Modern Approach, Cambridge University Press, 2009, p. 39.
  2. https://www.cs.williams.edu/~shikha/teaching/spring20/cs256/lectures/Lecture22.pdf
  3. https://baike.baidu.com/item/NP完全问题/4934286
  4. https://webdocs.cs.ualberta.ca/~zacharyf/courses/complexity_2019/notes/complexity-w19-lec03.pdf
  5. https://math.stackexchange.com/questions/2334429/what-is-the-difference-between-np-and-conp
  6. https://courses.cs.washington.edu/courses/cse533/05au/pcp-theorem.pdf
  7. https://www.khoury.northeastern.edu/home/wichs/class/crypto-fall17/lecture7.pdf